﻿using simpleHotel.Client.UserControls;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using simpleHotel.Client.HotelReference;

namespace simpleHotel.Client.UserControls
{
    public class ucBookingList: BaseUserControl
    {
    
        private void InitializeComponent()
        {
            this.SuspendLayout();
            // 
            // ucBookingList
            // 
            this.Name = "ucBookingList";
            this.Size = new System.Drawing.Size(896, 522);
            this.Load += new System.EventHandler(this.ucBookingList_Load);
            this.ResumeLayout(false);

        }

        private void butUpdate_Click(object sender, EventArgs e)
        {
            var form = new FormBookingDetail();
            form.ShowDialog();
        }

        private void butNew_Click(object sender, EventArgs e)
        {
            var form = new FormBookingDetail();
            form.ShowDialog();
        }

        private void butDelete_Click(object sender, EventArgs e)
        {
            var dr = MessageBox.Show("Bạn có muốn xóa đặt phòng đã chọn ?", "Thông báo", MessageBoxButtons.YesNo);
            if (dr == DialogResult.Yes) {
                DeleteBooking();
            }
        }

        private void DeleteBooking()
        {
            
        }

        private void ucBookingList_Load(object sender, EventArgs e)
        {
            var service = new HotelService();
            var table = service.GetAllBookings();
            //this.gvHotelList.DataSource = table;
        }
    }
}
